package odgs;

import java.io.Serializable;
import java.util.Date;

public class LoginedGridNode implements Serializable
{
	private String id;
	private String ip;
	private Date loginedTime;
	
	public LoginedGridNode(String id, String ip)
	{
		this.id = id;
		this.ip = ip;
		loginedTime = new Date();
	}

	
	/**
	 * @return the id
	 */
	public String getId()
	{
		return id;
	}


	/**
	 * @param id the id to set
	 */
	public void setId(String id)
	{
		this.id = id;
	}


	/**
	 * @return the ip
	 */
	public String getIp()
	{
		return ip;
	}


	/**
	 * @param ip the ip to set
	 */
	public void setIp(String ip)
	{
		this.ip = ip;
	}


	public boolean equals(Object arg0)
	{
		LoginedGridNode node = (LoginedGridNode) arg0;
		if(node.getId().equals(id))
			return true;
		else
			return false;
	}


	public Date getLoginTime()
	{
		return loginedTime;
	}
}